emacs.git
23 months agoSimplify code to use null
Jeremy Bryant [Mon, 18 Mar 2024 23:18:30 +0000 (23:18 +0000)]
Simplify code to use null

* which-key.el (which-key--create-buffer-and-show):
Use null.

23 months ago; Change defcustom types to natnum
Jeremy Bryant [Tue, 12 Mar 2024 22:34:03 +0000 (22:34 +0000)]
; Change defcustom types to natnum

* which-key.el
(which-key-frame-max-width, which-key-frame-max-height):
Change defcustom type integer to natnum.

2 years agoFix labeling of functions in which-key popup
Stefan Monnier [Thu, 28 Mar 2024 01:43:29 +0000 (21:43 -0400)]
Fix labeling of functions in which-key popup

Add a few minor changes.

2 years agoMerge remote-tracking branch 'origin/master'
Justin Burkett [Tue, 12 Mar 2024 20:33:50 +0000 (16:33 -0400)]
Merge remote-tracking branch 'origin/master'

2 years ago* which-key.el (which-key--create-pages): Untabify.
Jeremy Bryant [Sun, 10 Mar 2024 22:45:14 +0000 (22:45 +0000)]
* which-key.el (which-key--create-pages): Untabify.

2 years ago* which-key.el (which-key--pad-column): Untabify.
Jeremy Bryant [Sun, 10 Mar 2024 22:40:47 +0000 (22:40 +0000)]
* which-key.el (which-key--pad-column): Untabify.

2 years ago; * which-key.el (which-key--get-keymap-bindings-1): Use eql.
Jeremy Bryant [Sat, 9 Mar 2024 22:08:57 +0000 (22:08 +0000)]
; * which-key.el (which-key--get-keymap-bindings-1): Use eql.

2 years ago; * which-key.el (which-key--truncate-description): Untabify.
Jeremy Bryant [Sat, 9 Mar 2024 21:59:43 +0000 (21:59 +0000)]
; * which-key.el (which-key--truncate-description): Untabify.

2 years agoUse string-empty-p for readability.
Jeremy Bryant [Sat, 9 Mar 2024 21:54:23 +0000 (21:54 +0000)]
Use string-empty-p for readability.

* which-key.el (which-key--maybe-get-prefix-title):
Use string-empty-p for readability.

2 years agoDon't quote t
Jeremy Bryant [Fri, 8 Mar 2024 23:25:59 +0000 (23:25 +0000)]
Don't quote t

* which-key.el (which-key--replace-in-repl-list-many):
Don't quote t.

2 years agoUse declare form instead of put for clarity
Jeremy Bryant [Fri, 8 Mar 2024 23:20:07 +0000 (23:20 +0000)]
Use declare form instead of put for clarity

* which-key.el (which-key-add-keymap-based-replacements):
Use declare form instead of put property.

2 years agoMerge pull request #367 from tarsiiformes/long-gone
Justin Burkett [Fri, 8 Mar 2024 00:24:22 +0000 (19:24 -0500)]
Merge pull request #367 from tarsiiformes/long-gone

2 years agoRemove reference to long gone which-key-manual-update
Jonas Bernoulli [Fri, 8 Mar 2024 00:13:09 +0000 (01:13 +0100)]
Remove reference to long gone which-key-manual-update

* which-key.el (which-key--paging-functions): Remove reference to
which-key-manual-update.

This commands was remove in 42a25055163141165aa0269dbca69735e704825c.

2 years agoRemove unnecessary eval-when-compile
Jeremy Bryant [Wed, 6 Mar 2024 22:48:18 +0000 (22:48 +0000)]
Remove unnecessary eval-when-compile

* which-key.el (which-key--ignore-non-evil-keys-regexp):
Remove unnecessary eval-when-compile in regexp-opt.

2 years agoReplace internet link by Info node
Jeremy Bryant [Tue, 5 Mar 2024 22:40:57 +0000 (22:40 +0000)]
Replace internet link by Info node

* which-key.el (which-key-hide-alt-key-translations):
Replace internet link by Info node.

2 years ago; Replace tabs by spaces
Jeremy Bryant [Tue, 5 Mar 2024 22:01:58 +0000 (22:01 +0000)]
; Replace tabs by spaces

* which-key.el (which-key--paging-functions):  Replace tabs by spaces.

2 years agoSharp quote which-key-sort-order default.
Justin Burkett [Thu, 7 Mar 2024 17:45:03 +0000 (12:45 -0500)]
Sharp quote which-key-sort-order default.

2 years agoRemove unnecessary :group attributes
Jeremy Bryant [Mon, 4 Mar 2024 23:38:06 +0000 (23:38 +0000)]
Remove unnecessary :group attributes

* which-key.el:  Remove :group 'which-key in defcustoms.
(which-key-idle-delay):
(which-key-idle-secondary-delay):
(which-key-echo-keystrokes):
(which-key-max-description-length):
(which-key-min-column-description-width):
(which-key-add-column-padding):
(which-key-unicode-correction):
(which-key-dont-use-unicode):
(which-key-separator):
(which-key-ellipsis):
(which-key-prefix-prefix):
(which-key-compute-remaps):
(which-key-replacement-alist):
(which-key-allow-multiple-replacements):
(which-key-show-docstrings):
(which-key-highlighted-command-list):
(which-key-special-keys):
(which-key-buffer-name):
(which-key-show-prefix):
(which-key-popup-type):
(which-key-min-display-lines):
(which-key-max-display-columns):
(which-key-side-window-location):
(which-key-side-window-slot):
(which-key-side-window-max-width):
(which-key-side-window-max-height):
(which-key-frame-max-width):
(which-key-frame-max-height):
(which-key-allow-imprecise-window-fit):
(which-key-show-remaining-keys):
(which-key-sort-order):
(which-key-sort-uppercase-first):
(which-key-paging-prefixes):
(which-key-paging-key):
(which-key-use-C-h-commands):
(which-key-show-early-on-C-h):
(which-key-is-verbose):
(which-key-preserve-window-configuration):
(which-key-hide-alt-key-translations):
(which-key-delay-functions):
(which-key-allow-regexps):
(which-key-inhibit-regexps):
(which-key-show-transient-maps):
(which-key-init-buffer-hook):

2 years agoReplace member by memq for clarity
Jeremy Bryant [Fri, 1 Mar 2024 22:46:55 +0000 (22:46 +0000)]
Replace member by memq for clarity

* which-key.el (which-key--side-window-max-dimensions):
Replace member by memq.

2 years agoUse declare form instead of put, for clarity
Jeremy Bryant [Thu, 29 Feb 2024 22:33:48 +0000 (22:33 +0000)]
Use declare form instead of put, for clarity

* which-key.el (which-key-add-major-mode-key-based-replacements):
Use declare form instead of put.

2 years ago; Use string-join to simplify and make meaning explicit
Jeremy Bryant [Thu, 29 Feb 2024 21:47:50 +0000 (21:47 +0000)]
; Use string-join to simplify and make meaning explicit

* which-key.el (which-key--butlast-string):  Replace mapconcat by string-join.

2 years agoRemove github reference in preparation for integration to Emacs core
Jeremy Bryant [Tue, 27 Feb 2024 22:59:07 +0000 (22:59 +0000)]
Remove github reference in preparation for integration to Emacs core

* which-key.el:  Remove github reference.

2 years agoSpecify more precise customization type, natnum instead of integer
Jeremy Bryant [Thu, 29 Feb 2024 00:07:35 +0000 (00:07 +0000)]
Specify more precise customization type, natnum instead of integer

* which-key.el (which-key-add-column-padding):  Use natnum

2 years ago; Add sharp-quotes to function names
Jeremy Bryant [Sat, 24 Feb 2024 11:58:49 +0000 (11:58 +0000)]
; Add sharp-quotes to function names

Replace quoted list by (list ...) where each
element is sharp-quoted so that the byte-compiler can check if the
functions exist.

* which-key.el (which-key--paging-functions):  Add sharp-quotes to
function names.

2 years agoRemove unnecessary eval-when-compile from definition
Jeremy Bryant [Sat, 24 Feb 2024 12:38:45 +0000 (12:38 +0000)]
Remove unnecessary eval-when-compile from definition

* which-key.el (which-key--ignore-keys-regexp):  Remove eval-when-compile.

2 years agoDisentangle third party libraries (but keep support for now)
Justin Burkett [Wed, 21 Feb 2024 01:38:30 +0000 (20:38 -0500)]
Disentangle third party libraries (but keep support for now)

Add `which-key-inhibit-display-hook' to allow third-party libraries to prevent
which-key from displaying in certain circumstances. Add
`which-key-this-command-keys-function' as a customizable variable to allow
third-party libraries to teach which-key about custom symbols they insert into
the key sequence.

Add `which-key-evil-this-operator-p', `which-key-god-mode-self-insert-p' and
`which-key--god-mode-this-command-keys' to provide support for god-mode and evil
using the new mechanisms.

2 years agoRemove "Internal" from docstrings of defvars
Justin Burkett [Wed, 21 Feb 2024 01:00:22 +0000 (20:00 -0500)]
Remove "Internal" from docstrings of defvars

The internal status is implied by the double hyphen in the name.

2 years agoBump year to 2024
Jeremy Bryant [Tue, 20 Feb 2024 23:09:17 +0000 (23:09 +0000)]
Bump year to 2024

* which-key.el:  Bump year

2 years agoSimplify test for empty list
Jeremy Bryant [Tue, 20 Feb 2024 21:37:10 +0000 (21:37 +0000)]
Simplify test for empty list

* which-key.el (which-key--show-keymap):  Use (null)

2 years agoMention affected settings of which-key-dont-use-unicode
Jeremy Bryant [Tue, 20 Feb 2024 21:21:54 +0000 (21:21 +0000)]
Mention affected settings of which-key-dont-use-unicode

* which-key.el (which-key-separator):  Improve docstring

2 years agoAdd a :version tag to all defcustom's and defface's
Jeremy Bryant [Mon, 19 Feb 2024 23:41:28 +0000 (23:41 +0000)]
Add a :version tag to all defcustom's and defface's

* which-key.el: add :version tag to all following
(which-key-idle-delay):
(which-key-idle-secondary-delay):
(which-key-echo-keystrokes):
(which-key-max-description-length):
(which-key-min-column-description-width):
(which-key-add-column-padding):
(which-key-unicode-correction):
(which-key-dont-use-unicode):
(which-key-separator):
(which-key-ellipsis):
(which-key-prefix-prefix):
(which-key-compute-remaps):
(which-key-replacement-alist):
(which-key-allow-multiple-replacements):
(which-key-show-docstrings):
(which-key-highlighted-command-list):
(which-key-special-keys):
(which-key-buffer-name):
(which-key-show-prefix):
(which-key-popup-type):
(which-key-min-display-lines):
(which-key-max-display-columns):
(which-key-side-window-location):
(which-key-side-window-slot):
(which-key-side-window-max-width):
(which-key-side-window-max-height):
(which-key-frame-max-width):
(which-key-frame-max-height):
(which-key-allow-imprecise-window-fit):
(which-key-show-remaining-keys):
(which-key-sort-order):
(which-key-sort-uppercase-first):
(which-key-paging-prefixes):
(which-key-paging-key):
(which-key-use-C-h-commands):
(which-key-show-early-on-C-h):
(which-key-is-verbose):
(which-key-preserve-window-configuration):
(which-key-hide-alt-key-translations):
(which-key-delay-functions):
(which-key-allow-regexps):
(which-key-inhibit-regexps):
(which-key-show-transient-maps):
(which-key-init-buffer-hook):
(which-key-key-face):
(which-key-separator-face):
(which-key-note-face):
(which-key-command-description-face):
(which-key-local-map-description-face):
(which-key-highlighted-command-face):
(which-key-group-description-face):
(which-key-special-key-face):
(which-key-docstring-face):
(which-key-custom-popup-max-dimensions-function):
(which-key-custom-hide-popup-function):
(which-key-custom-show-popup-function):
(which-key-lighter):
(which-key-allow-evil-operators):
(which-key-show-operator-state-maps):

2 years agoFormat first sentences of docstrings.
Justin Burkett [Fri, 9 Feb 2024 02:36:45 +0000 (21:36 -0500)]
Format first sentences of docstrings.

Ensure a complete sentence (at least a phrase with a period at the end) that
fits on one line.

2 years ago* which-key.el: Add two spaces in docstrings and punctation
Jeremy Bryant [Thu, 8 Feb 2024 23:28:10 +0000 (23:28 +0000)]
* which-key.el: Add two spaces in docstrings and punctation

(which-key-echo-keystrokes):
(which-key-popup-type):
(which-key-min-display-lines):
(which-key-side-window-location):
(which-key-show-early-on-C-h):
(which-key-allow-regexps):
(which-key-group-description-face):
(which-key-docstring-face):
(which-key-enable-god-mode-support):
(which-key-setup-minibuffer):
(which-key-add-keymap-based-replacements):
(which-key--maybe-replace):
(which-key--maybe-add-docstring):
(which-key--get-keymap-bindings):
(which-key-reload-key-sequence):

2 years agoFix popup with no space
Justin Burkett [Tue, 5 Sep 2023 21:28:29 +0000 (17:28 -0400)]
Fix popup with no space

Fixes #317

2 years agoAdd which-key-C-h-map-prompt to make it customizable
Justin Burkett [Wed, 12 Jul 2023 21:51:08 +0000 (17:51 -0400)]
Add which-key-C-h-map-prompt to make it customizable

Fixes #350

2 years agoRemove old "recent changes" from README
Justin Burkett [Tue, 6 Jun 2023 22:27:27 +0000 (18:27 -0400)]
Remove old "recent changes" from README

3 years agoCatch errors in kbd
Justin Burkett [Thu, 30 Mar 2023 21:21:49 +0000 (17:21 -0400)]
Catch errors in kbd

Fixes #346

3 years agoMerge commit 'pullreqs/343'
Justin Burkett [Thu, 11 Aug 2022 16:16:11 +0000 (12:16 -0400)]
Merge commit 'pullreqs/343'

3 years agoIgnore .DS_Store
Justin Burkett [Thu, 11 Aug 2022 13:32:24 +0000 (09:32 -0400)]
Ignore .DS_Store

3 years agoMerge pull request #342 from tarsiiformes/quote-quote
Justin Burkett [Thu, 11 Aug 2022 13:24:40 +0000 (09:24 -0400)]
Merge pull request #342 from tarsiiformes/quote-quote

Replace or quote certain single quotes in docstrings

3 years agoAllow truncating without using any ellipsis
Jonas Bernoulli [Thu, 4 Aug 2022 12:05:16 +0000 (14:05 +0200)]
Allow truncating without using any ellipsis

Depending on how bindings are displayed showing docstrings can result
in most lines being too long and adding ellipses to most lines can be
quite ugly and distracting.

3 years agoDon't make description longer than allowed when truncating
Jonas Bernoulli [Thu, 4 Aug 2022 12:05:15 +0000 (14:05 +0200)]
Don't make description longer than allowed when truncating

Truncating the description to the allowed maximal length and then
appending an ellipsis, makes the final text longer than allowed.
The length of the ellipsis has to be taken into account.

3 years agoSupport different types for which-key-max-description-length
Jonas Bernoulli [Thu, 4 Aug 2022 12:05:13 +0000 (14:05 +0200)]
Support different types for which-key-max-description-length

Using a function is useful, e.g., to use a different maximal
width, depending on the value of `which-key-show-docstrings'.

3 years agoAvoid unnecessary work
Jonas Bernoulli [Thu, 4 Aug 2022 12:05:12 +0000 (14:05 +0200)]
Avoid unnecessary work

3 years agoFix vertical off-by-one error
Jonas Bernoulli [Thu, 4 Aug 2022 12:05:11 +0000 (14:05 +0200)]
Fix vertical off-by-one error

When the usage information is displayed at the top or bottom (as
controlled by `which-key-show-prefix'), then we already accounted
for that by putting (- max-height 1) bindings in each row.  But
we did not ensure that the max-height is used when displaying the
result.  Instead we used (- max-height 1) here too.

When trying to display usage information at the bottom, the result is
that it is not displayed because it is off-window.  When displaying at
the top, then it is displayed, but the last binding is off-window and
never displayed.

This bug did not matter (much) when using the default settings because
then the code used for displaying the window actually ignores the
max-height and just uses the height appropriate to display all lines
in the buffer (i.e., (+ max-height 1)).  However, other display
methods, including but not necessarily limited to third-party methods
(such as `which-key-posframe') may choose to, or absolutely have to,
respect max-height.  In particular, anything that tries to use the
full height of a frame or window, will be affected by this.

3 years agoFix horizontal off-by-one error
Jonas Bernoulli [Thu, 4 Aug 2022 12:05:09 +0000 (14:05 +0200)]
Fix horizontal off-by-one error

Delay increasing width used by columns until we know that we have to
do so because we have determined that there is enough room to add an
additional column and a space between the last two columns.

If we don't do that, then we can easily get an off-by-one error.  If
docstrings are shown and the window is narrow, then it is likely that
we end up using the maximal width.  If we then add one to the actual
width and later compare that again with the maximal width, then that
is too width.

3 years agoDon't pad beyond maximal width
Jonas Bernoulli [Thu, 4 Aug 2022 12:05:08 +0000 (14:05 +0200)]
Don't pad beyond maximal width

The old implementation behaved as if the "description" is the only
information that is being displayed, however in actuality the
available width has to be shared with the key (and the separator
between the two).

Failing to take that into account meant that every binding whose
description isn't *by itself* wider than the width available to
display all the information got excessive padding, which later has to
be removed during truncation again (resulting in misleading ellipses).

3 years agoDisplaying just one column means pages are arranged vertically
Jonas Bernoulli [Thu, 4 Aug 2022 12:05:07 +0000 (14:05 +0200)]
Displaying just one column means pages are arranged vertically

Third-party display methods may do that without using a side-window,
and therefore they don't set `which-key-popup-type' to `side-window'.
Likewise they might not set `which-key-side-window-location', e.g.,
because their display method only supports one location.

`which-key-max-display-columns' being 1 is by itself already enough
of an indicator to know that there won't be multiple columns.

3 years agoCalculate format string only once
Jonas Bernoulli [Thu, 4 Aug 2022 12:05:06 +0000 (14:05 +0200)]
Calculate format string only once

3 years agoReplace or quote certain single quotes in docstrings
Jonas Bernoulli [Fri, 27 May 2022 22:28:57 +0000 (00:28 +0200)]
Replace or quote certain single quotes in docstrings

The byte-compiler recently got more fussy about quotes.

3 years agoAdd group to minor-mode definition
Justin Burkett [Wed, 18 May 2022 19:41:11 +0000 (15:41 -0400)]
Add group to minor-mode definition

Fixes #339

3 years agoMerge remote-tracking branch 'origin/master'
Justin Burkett [Tue, 19 Apr 2022 02:27:45 +0000 (22:27 -0400)]
Merge remote-tracking branch 'origin/master'

3 years agoAdd an example to README for keymap binding
Justin Burkett [Tue, 19 Apr 2022 02:26:35 +0000 (22:26 -0400)]
Add an example to README for keymap binding

See #338

4 years agoBump version
Justin Burkett [Mon, 14 Feb 2022 18:18:32 +0000 (13:18 -0500)]
Bump version

4 years agoDon't allow transient maps when prefix length is zero.
Justin Burkett [Mon, 14 Feb 2022 03:33:02 +0000 (22:33 -0500)]
Don't allow transient maps when prefix length is zero.

Fixes #335

4 years agoFix typo in ellipsis
Justin Burkett [Sun, 2 Jan 2022 14:33:02 +0000 (09:33 -0500)]
Fix typo in ellipsis

4 years agoMerge pull request #329 from hans-d/feat-elipsis
Justin Burkett [Sun, 2 Jan 2022 04:28:19 +0000 (23:28 -0500)]
Merge pull request #329 from hans-d/feat-elipsis

add which-key-elipsis

4 years agoMerge branch 'feat-columnsize'
Justin Burkett [Sun, 2 Jan 2022 04:26:37 +0000 (23:26 -0500)]
Merge branch 'feat-columnsize'

4 years agoFix code column width
Justin Burkett [Sun, 2 Jan 2022 04:25:59 +0000 (23:25 -0500)]
Fix code column width

4 years agoMerge pull request #331 from skangas/gnu-elpa-badge
Justin Burkett [Sun, 2 Jan 2022 04:11:21 +0000 (23:11 -0500)]
Merge pull request #331 from skangas/gnu-elpa-badge

Add GNU ELPA badge

4 years agoAdd GNU ELPA badge to README.org
Stefan Kangas [Sat, 1 Jan 2022 00:38:56 +0000 (01:38 +0100)]
Add GNU ELPA badge to README.org

4 years agoadd which-key-elipsis
Hans Donner [Fri, 24 Dec 2021 19:00:51 +0000 (20:00 +0100)]
add which-key-elipsis

4 years agoadd which-key-min-column-description-width
Hans Donner [Fri, 24 Dec 2021 07:26:04 +0000 (08:26 +0100)]
add which-key-min-column-description-width

4 years agoUpdate to the newer advice API
Justin Burkett [Tue, 14 Dec 2021 02:27:32 +0000 (21:27 -0500)]
Update to the newer advice API

Patch submitted by Stefan Monnier

4 years agoFix key-chord handling
Justin Burkett [Thu, 9 Dec 2021 04:57:20 +0000 (23:57 -0500)]
Fix key-chord handling

It turns out we don't need to do anything too tricky for key-chords, because
this-single-command-raw-keys returns the correct key-sequence

Fixes #254

4 years agoRespect which-key-min-display-lines setting
Justin Burkett [Fri, 26 Nov 2021 03:45:35 +0000 (22:45 -0500)]
Respect which-key-min-display-lines setting

Fixes #325

4 years agoAllow binding to symbols in which-key-C-h-dispatch
Justin Burkett [Fri, 26 Nov 2021 02:32:18 +0000 (21:32 -0500)]
Allow binding to symbols in which-key-C-h-dispatch

Fixes #326

4 years agoMerge pull request #327 from anis-semmar/patch-1
Justin Burkett [Fri, 26 Nov 2021 02:00:25 +0000 (21:00 -0500)]
Merge pull request #327 from anis-semmar/patch-1

README.org: fix page flipping command names

4 years agoMerge pull request #321 from fredericgiquel/preserve-window-configuration
Justin Burkett [Fri, 26 Nov 2021 01:58:22 +0000 (20:58 -0500)]
Merge pull request #321 from fredericgiquel/preserve-window-configuration

Preserve window configuration

4 years agoREADME.org: fix page flipping command names
anis-semmar [Thu, 18 Nov 2021 16:30:41 +0000 (17:30 +0100)]
README.org: fix page flipping command names

`which-key-show-next-page` / `which-key-show-previous-page` do not exist, state the correct command name.

4 years agoMerge pull request #323 from Zetagon/master
Justin Burkett [Tue, 24 Aug 2021 00:11:35 +0000 (20:11 -0400)]
Merge pull request #323 from Zetagon/master

Add missing argument to function call

4 years agoAdd missing argument to function call
Leo Okawa Ericson [Mon, 23 Aug 2021 11:01:01 +0000 (13:01 +0200)]
Add missing argument to function call

4 years agoAdd option (default off) to restore window configuration
Frédéric Giquel [Wed, 18 Aug 2021 08:17:28 +0000 (10:17 +0200)]
Add option (default off) to restore window configuration

4 years agoMerge pull request #313 from duncanburke/master
Justin Burkett [Tue, 17 Aug 2021 17:35:22 +0000 (13:35 -0400)]
Merge pull request #313 from duncanburke/master

Add support for help-char being a generalized input event

4 years agoPreserve window configuration
Frédéric Giquel [Fri, 30 Jul 2021 16:06:29 +0000 (18:06 +0200)]
Preserve window configuration

4 years agoMerge pull request #315 from peniblec/keymap-names
Justin Burkett [Wed, 28 Jul 2021 01:50:13 +0000 (21:50 -0400)]
Merge pull request #315 from peniblec/keymap-names

Fix some keymap names not showing up

4 years agoFix some keymap names not showing up
Kévin Le Gouguec [Sun, 18 Jul 2021 16:53:14 +0000 (18:53 +0200)]
Fix some keymap names not showing up

Closes #314.

4 years agoAdd support for help-char being a generalized input event
Duncan Burke [Tue, 13 Jul 2021 15:24:05 +0000 (01:24 +1000)]
Add support for help-char being a generalized input event

Not all keyboard events can be represented as a character. For example,
while ?\C-h is a character, represented as 8 in decimal, C-M-h is
represented by 134217736 in decimal, as can be obtained from:

(elt (kbd "C-M-h") 0)

It is useful to allow help-char to be set to something other than a
character, as characters cover only a very small region of possible
input events. This is especially important because help-char is used to
bring up the pagination menu (when which-key-use-C-h-commands is t), and
this won't work if it conflicts with any keybinding within the prefix
command that led to the activation of which-key.

If help-char is left set to ?\C-h things work fine because as a
convention keymaps avoid binding that due to it being the default
binding for help. That is just a convention, however, and things become
more difficult with a heavily user-customized set of keybindings that
preclude the use of ?\C-h for that purpose.

In that case, if ?\C-h cannot be used, it is much easier to find a
binding for help-char that is unlikely to conflict with any bindings if
it is permitted to use the full range of modifier keys.

This patch modifies which-key--next-page-hint, which is the only place
that broke when I set help-char to a keyboard event that wasn't a
character. Rather than doing a string comparison, help-char and prefix
keys are put in vectors and equality is checked that way.

4 years agoRemove more instances of obsolete variables.
Justin Burkett [Mon, 12 Jul 2021 18:52:52 +0000 (14:52 -0400)]
Remove more instances of obsolete variables.

4 years agoMerge remote-tracking branch 'origin/master'
Justin Burkett [Sun, 11 Jul 2021 01:08:08 +0000 (21:08 -0400)]
Merge remote-tracking branch 'origin/master'

4 years agoRemove some obsolete variables/functions
Justin Burkett [Sun, 11 Jul 2021 01:03:55 +0000 (21:03 -0400)]
Remove some obsolete variables/functions

4 years agoDon't require evil in which-key-tests.el
Justin Burkett [Tue, 6 Jul 2021 14:33:39 +0000 (10:33 -0400)]
Don't require evil in which-key-tests.el

Patch from Stefan Monnier

4 years agoFix compiler warnings
Justin Burkett [Wed, 30 Jun 2021 12:17:03 +0000 (08:17 -0400)]
Fix compiler warnings

Fixes #312

4 years agoHandle closure definition type
Justin Burkett [Wed, 30 Jun 2021 02:35:58 +0000 (22:35 -0400)]
Handle closure definition type

Fixes #311

4 years agoImprove which-key-add-keymap-based-replacements.
Justin Burkett [Tue, 22 Jun 2021 17:20:40 +0000 (13:20 -0400)]
Improve which-key-add-keymap-based-replacements.

Also, teach which-key--safe-lookup-key to handle numeric results.

4 years agoClarify usage of keymap replacements in docstrings and README
Justin Burkett [Tue, 22 Jun 2021 15:36:27 +0000 (11:36 -0400)]
Clarify usage of keymap replacements in docstrings and README

4 years agoClean up some docstrings
Justin Burkett [Tue, 22 Jun 2021 15:26:11 +0000 (11:26 -0400)]
Clean up some docstrings

4 years agoClean up which-key--maybe-replace
Justin Burkett [Tue, 22 Jun 2021 15:22:32 +0000 (11:22 -0400)]
Clean up which-key--maybe-replace

4 years agoImprove which-key-add-keymap-based-bindings
Justin Burkett [Tue, 22 Jun 2021 11:37:04 +0000 (07:37 -0400)]
Improve which-key-add-keymap-based-bindings

Add a test

4 years agoFix key sort order functions
Justin Burkett [Tue, 22 Jun 2021 03:34:18 +0000 (23:34 -0400)]
Fix key sort order functions

We now always get the full key description (prefix + binding)

4 years agoTry again to fix tests
Justin Burkett [Tue, 22 Jun 2021 03:10:22 +0000 (23:10 -0400)]
Try again to fix tests

4 years agoTurn off fail-fast in github action
Justin Burkett [Tue, 22 Jun 2021 03:03:20 +0000 (23:03 -0400)]
Turn off fail-fast in github action

4 years agoTry without cask
Justin Burkett [Tue, 22 Jun 2021 02:55:33 +0000 (22:55 -0400)]
Try without cask

4 years agoAdd install python step to github action
Justin Burkett [Tue, 22 Jun 2021 02:40:54 +0000 (22:40 -0400)]
Add install python step to github action

4 years agoFix which-key--group-p
Justin Burkett [Tue, 22 Jun 2021 02:32:23 +0000 (22:32 -0400)]
Fix which-key--group-p

length> is a new function maybe

4 years agoTry with cask again
Justin Burkett [Tue, 22 Jun 2021 02:25:15 +0000 (22:25 -0400)]
Try with cask again

4 years agoFix github action
Justin Burkett [Tue, 22 Jun 2021 02:15:34 +0000 (22:15 -0400)]
Fix github action

4 years agoFix test
Justin Burkett [Mon, 21 Jun 2021 20:02:45 +0000 (16:02 -0400)]
Fix test

4 years agoUpdate README
Justin Burkett [Mon, 21 Jun 2021 19:57:40 +0000 (15:57 -0400)]
Update README

4 years agoMake enable-extended-define-key obsolete
Justin Burkett [Mon, 21 Jun 2021 19:51:22 +0000 (15:51 -0400)]
Make enable-extended-define-key obsolete